{extend name="layout/layout" /}

{block name="content"}
<blockquote class="layui-elem-quote quoteBox" style="height: 38px;line-height: 38px;">


        <div class="layui-input-inline">
            <h2 >新增采购单</h2>
        </div>
    <div class="layui-input-inline" style="float: right;">
        <a  href="javascript:history.back(-1)"  class="layui-btn layui-btn-normal ">历史采购单</a>
    </div>

</blockquote>

<blockquote class="layui-elem-quote quoteBox" style="height: 46px;border-left:none">

    <div class="layui-form-item">
        <div class="layui-inline" style="margin-top: 12px;">
            <span style="">供货商：{$supname}</span>
        </div>
        <div class="layui-inline" style="float: right">
            <button class="layui-btn search_product" data-supid="{$supid}">搜索商品 <i class="layui-icon">&#xe615;</i></button>
        </div>
    </div>
</blockquote>

<table id="dataTable02" lay-filter="dataTable02_filter"></table>

<div class="layui-form-item layui-form-text" style="margin-top: 10px;">

    <textarea id="remarks" placeholder="采购单备注" class="layui-textarea"></textarea>

</div>


<blockquote class="layui-elem-quote quoteBox" style="height: 46px;margin-top: 10px;border-left:none">

    <div class="layui-form-item">
        <div class="layui-inline" style="margin-top: 12px;">
            <span style="">合计</span>
        </div>
        <div class="layui-inline" style="float: right">
            <button class="layui-btn save_btn">提交采购单</button>
        </div>
        <div class="layui-inline" style="float:right;margin-top: 12px;margin-right: 100px;">
            总金额：￥<span id="allprice" style=""></span>
        </div>

    </div>
</blockquote>


<!--操作-->
<script type="text/html" id="handleBar">
    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
</script>




<input type="hidden" class="datalist_url" value="{:url('admin/Purchase/index')}">
<input type="hidden" class="add_url" value="{:url('admin/Purchase/add')}">
<input type="hidden" class="edit_url" value="{:url('admin/Purchase/edit')}">
<input type="hidden" class="delete_url" value="{:url('admin/Purchase/delete')}">
<input type="hidden" class="get_session_pro" value="{:url('admin/Purchase/get_session_pro')}">
<input type="hidden" class="select_product_url" value="{:url('admin/Purchase/select_product')}">
<input type="hidden" class="edit_purchase_car" value="{:url('admin/Purchase/edit_purchase_car')}">
<input type="hidden" class="save_purchase" value="{:url('admin/Purchase/save_purchase')}">
<input type="hidden" class="delete_purchase_car_url" value="{:url('admin/Purchase/delete_purchase_car')}">

{/block}


{block name="pagescript"}
<script>
    var DELETE_URL = "{:url('admin/product/delete')}";
</script>

<script src="__STATIC__/admin/pages/js/purchase.js" type="text/javascript"></script>
{/block}

